
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreProductRequest struct {

	MerId string `json:"mer_id" form:"mer_id"`

	Image string `json:"image" form:"image"`

	RecommendImage string `json:"recommend_image" form:"recommend_image"`

	SliderImage string `json:"slider_image" form:"slider_image"`

	StoreName string `json:"store_name" form:"store_name"`

	StoreInfo string `json:"store_info" form:"store_info"`

	Keyword string `json:"keyword" form:"keyword"`

	BarCode string `json:"bar_code" form:"bar_code"`

	CateId string `json:"cate_id" form:"cate_id"`

	Price string `json:"price" form:"price"`

	VipPrice string `json:"vip_price" form:"vip_price"`

	OtPrice string `json:"ot_price" form:"ot_price"`

	Postage string `json:"postage" form:"postage"`

	UnitName string `json:"unit_name" form:"unit_name"`

	Sort string `json:"sort" form:"sort"`

	Sales string `json:"sales" form:"sales"`

	Stock string `json:"stock" form:"stock"`

	IsShow string `json:"is_show" form:"is_show"`

	IsHot string `json:"is_hot" form:"is_hot"`

	IsBenefit string `json:"is_benefit" form:"is_benefit"`

	IsBest string `json:"is_best" form:"is_best"`

	IsNew string `json:"is_new" form:"is_new"`

	IsVirtual string `json:"is_virtual" form:"is_virtual"`

	VirtualType string `json:"virtual_type" form:"virtual_type"`

	AddTime string `json:"add_time" form:"add_time"`

	IsPostage string `json:"is_postage" form:"is_postage"`

	IsDel string `json:"is_del" form:"is_del"`

	MerUse string `json:"mer_use" form:"mer_use"`

	GiveIntegral string `json:"give_integral" form:"give_integral"`

	Cost string `json:"cost" form:"cost"`

	IsSeckill string `json:"is_seckill" form:"is_seckill"`

	IsBargain string `json:"is_bargain" form:"is_bargain"`

	IsGood string `json:"is_good" form:"is_good"`

	IsSub string `json:"is_sub" form:"is_sub"`

	IsVip string `json:"is_vip" form:"is_vip"`

	Ficti string `json:"ficti" form:"ficti"`

	Browse string `json:"browse" form:"browse"`

	CodePath string `json:"code_path" form:"code_path"`

	SoureLink string `json:"soure_link" form:"soure_link"`

	VideoLink string `json:"video_link" form:"video_link"`

	TempId string `json:"temp_id" form:"temp_id"`

	SpecType string `json:"spec_type" form:"spec_type"`

	Activity string `json:"activity" form:"activity"`

	Spu string `json:"spu" form:"spu"`

	LabelId string `json:"label_id" form:"label_id"`

	CommandWord string `json:"command_word" form:"command_word"`

	RecommendList string `json:"recommend_list" form:"recommend_list"`

	VipProduct string `json:"vip_product" form:"vip_product"`

	Presale string `json:"presale" form:"presale"`

	PresaleStartTime string `json:"presale_start_time" form:"presale_start_time"`

	PresaleEndTime string `json:"presale_end_time" form:"presale_end_time"`

	PresaleDay string `json:"presale_day" form:"presale_day"`

	Logistics string `json:"logistics" form:"logistics"`

	Freight string `json:"freight" form:"freight"`

	CustomForm string `json:"custom_form" form:"custom_form"`

	IsLimit string `json:"is_limit" form:"is_limit"`

	LimitType string `json:"limit_type" form:"limit_type"`

	LimitNum string `json:"limit_num" form:"limit_num"`

	MinQty string `json:"min_qty" form:"min_qty"`

}

func (r *StoreProductRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreProductRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"mer_id": "required",

		"image": "required",

		"recommend_image": "required",

		"slider_image": "required",

		"store_name": "required",

		"store_info": "required",

		"keyword": "required",

		"bar_code": "required",

		"cate_id": "required",

		"price": "required",

		"vip_price": "required",

		"ot_price": "required",

		"postage": "required",

		"unit_name": "required",

		"sort": "required",

		"sales": "required",

		"stock": "required",

		"is_show": "required",

		"is_hot": "required",

		"is_benefit": "required",

		"is_best": "required",

		"is_new": "required",

		"is_virtual": "required",

		"virtual_type": "required",

		"add_time": "required",

		"is_postage": "required",

		"is_del": "required",

		"mer_use": "required",

		"give_integral": "required",

		"cost": "required",

		"is_seckill": "required",

		"is_bargain": "required",

		"is_good": "required",

		"is_sub": "required",

		"is_vip": "required",

		"ficti": "required",

		"browse": "required",

		"code_path": "required",

		"soure_link": "required",

		"video_link": "required",

		"temp_id": "required",

		"spec_type": "required",

		"activity": "required",

		"spu": "required",

		"label_id": "required",

		"command_word": "required",

		"recommend_list": "required",

		"vip_product": "required",

		"presale": "required",

		"presale_start_time": "required",

		"presale_end_time": "required",

		"presale_day": "required",

		"logistics": "required",

		"freight": "required",

		"custom_form": "required",

		"is_limit": "required",

		"limit_type": "required",

		"limit_num": "required",

		"min_qty": "required",

	}
}

func (r *StoreProductRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreProductRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreProductRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
